<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="/oa/Public/css/global.css" />
<script type="text/javascript" src="/oa/Public/js/jquery.js"></script>
<title>OA办公自动化应用系统</title>

</head>
<body>
<div id='dya'>
	<div id="topbar">
		<div class="logo"></div>
		<div class="nav">
			<a href="javascript:void(0);" target="main" class="topbar_link" onclick="home();" title="桌面"><div class="nav_s"><span class="ico_home"></span></div></a>
			<a href="javascript:void(0);" target="main" class="sms topbar_link" onclick="sms();" title="消息"><div class="nav_s"><span class="sms ico_sms"></span><span class="smstips"></span></div></a>
			<a href="javascript:void(0);" target="_parent" class="topbar_link" onclick="set();" title="个人设置"><div class="nav_s"><span class="ico_set"></span></div></a>
			<a href="javascript:void(0);" target="_parent" class="topbar_link" title="帮助"><div class="nav_s"><span class="ico_help"></span></div></a>
			<a href="/oa/index.php/Login/logout" target="_parent" class="topbar_link" title="退出"><div class="nav_s"><span class="ico_logout"></span></div></a>
			<div class="nav_portrait"><a><img src="/oa/Public/avatar/<?php echo ($photo); ?>" title="头像" /></a></div>
			<div class="nav_personal"><span><label><?php echo ($data["name"]); ?>&nbsp;&nbsp;职级：(<?php echo ($data["rank"]); ?>)</label><br><label><?php echo ($data["dept_name"]); ?></label></span></div>
		</div>
	</div>
</div>
</body>
<script type="text/javascript">
	window.setInterval(getsms,10000);
	$(document).ready(function(){
		getsms();
	});
	function getsms(){
		$.get("/oa/index.php/Sms/sms",function(result){
			if(result > 0){
				$(".sms").removeClass("ico_sms");
				$(".sms").addClass("ico_sms1");
				$(".sms.topbar_link").attr("title","你有 "+result+" 条未查看的消息！");
				$(".sms .ico_sms1").html(result);
				window.parent.frames.titleWink();
			}else{
				$(".sms").removeClass("ico_sms1");
				$(".sms").addClass("ico_sms");
				$(".sms.topbar_link").attr("title","消息");
				$(".sms .ico_sms").html("");
				window.parent.frames.clearWink();
			}
			
		});
	}
	function set(){
		parent.main.location="/oa/index.php/User/way?menu_id=9";
		parent.frames['menu'].ready();
	}
	function sms(){
		parent.main.location="/oa/index.php/Sms/smslist";
		parent.frames['menu'].ready();
	}
	function home(){
		parent.main.location="/oa/index.php/Index/main";
		parent.frames['menu'].ready();
	}
</script>
</html>